package com.cardetective.shopcar.network.api

import com.android.base_network.data.BaseResponse
import com.cardetective.shopcar.network.model.BindMobilePost
import com.cardetective.shopcar.network.model.LoginAndRegisterInfo
import com.cardetective.shopcar.network.model.LoginPost
import kotlinx.coroutines.flow.Flow
import retrofit2.http.Body
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * 登录，注册，忘记密码，创建密码
 * */
interface LoginApi {

    // 注册登录
    @POST("/v3/login/loginWithEmail")
    fun postLogin(@Body loginPost: LoginPost): Flow<BaseResponse<LoginAndRegisterInfo>>

    // 绑定手机号
    @FormUrlEncoded
    @POST("/v3/login/loginBindTel")
    fun bindMobile(@Body bindMobile: BindMobilePost): Flow<BaseResponse<String>>


}